import request from "@/utils/request";

export default {
  // 游戏列表
  games() {
    return request.get("guessHero/games");
  },
  // 历史开奖记录
  // {game:string,page:number = 1,size:number = 10}
  getHistoryAward(game, page = 1, size = 10) {
    return request.get("guessHero/lists", {
      game,
      page,
      size
    });
  },
  // 所有英雄的列表
  getHeros(game, page = 1, size = 10) {
    return request.post("guessHero/allHeros", {
      game,
      page,
      size
    });
  },
  // 投注预测
  // {game:string,num:int,num_ap:int,sex:int,sex_ap:int,remote:int,remote_ap:int,magic:int,magic_ap:int}
  postGuessHero(formData) {
    return request.post("guessHero/guess", formData);
  },
  // 鲜花补满体力值{useDebt:0} 是否使用白条
  postAp2Flower(formData) {
    return request.post("coin/buyApWithFlower", formData);
  },
  // 竞猜记录
  getGuessHeroRecord(page = 1, size = 10) {
    return request.get("betOrder/guessHeroOrder", {
      page,
      size
    });
  }
};
